<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--允许全屏-->
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="referrer" content="no-referrer">
    <meta name="applicable-device" content="mobile">
    <meta http-equiv="Content-Type" content="text/html">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
    <meta name="format-detection" content="email=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="My App">
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="full-screen" content="yes">
    <meta name="browsermode" content="application">
    <meta name="x5-page-mode" content="app">
    <meta name="x5-fullscreen" content="true">
    <meta name="x5-orientation" content="portrait">
    <meta name="screen-orientation" content="portrait">
    <meta name="baidu-site-verification" content="OlHm31P42t" />
    <link rel="stylesheet" href="/static/css/app/workspace/otherSettings/otherSettings.css">
    <script src="/static/js/app/workspace/jquery.min.js"></script>
    <script src="/static/js/app/workspace/flexible.js"></script>
    <script src="/static/js/app/workspace/init.js"></script>
    <script src="/static/js/app/workspace/util.js"></script>
    <title>加载中...</title>
</head>
<body>
<script src="/static/js/common/Monitor.js"></script>
<div class="settings">
    <div class="loading">
        <div>
            <img src="/static/img/app/workspace/loading.gif" alt="">
            <p>加载中...</p>
        </div>
    </div>
</div>
<script>
    window.onload=function () {
        var accessId = getParameter("x-access-id");
        var accessToken = getParameter("x-access-token");
        var ua = "h5";
        var H=window.innerHeight;
        $(".settings").css("height",H);
        //获取当前地址前部分
        var href = window.location.href;
        var pos = href.indexOf("/otherSettings/");
        var base_url = href.slice(0, pos);
        var u = navigator.userAgent.toLowerCase();
        console.log();

        $.ajax({
            url: genUrl("/customer/findCustomerInfo"),
            type: 'GET',
            contentType:"application/json",
            headers:{
                "x-access-id":accessId ,
                "x-access-token": accessToken,
                "x-ua": ua
            },
            data: {"customerId":accessId},
            dataType: 'json',
            async: false,
            success: function (res) {
                if(res.code!=0){
                    alert(res.message);
                    return;
                }
                var hktc=res.data.hktc;

                if(hktc=="0"){
                    window.location.href=base_url+"/otherSettings/otherSettings.html?x-access-id="+accessId+"&x-access-token="+accessToken+"&customerId="+accessId+"";
                }else{
                    window.location.href="https://www.huakai.me/entrance.html";
                }

            }
        });
    }
</script>
</body>
</html>